package org.example.rowing.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.rowing.domain.Registration;
import org.example.rowing.domain.RegistrationWithAthlete;
import org.example.rowing.vo.RegistrationVO;

import java.util.List;

@Mapper
public interface RegistrationMapper {
    List<Registration> selectAllRegistrations();

    Registration selectRegistrationById(Long id);

    Long insertRegistration(Registration registration);

    Boolean updateRegistration(Registration registration);

    Boolean deleteRegistration(Long id);

    List<Registration> selectRegistrationByConditions(Registration registration);

    List<RegistrationWithAthlete> selectAthleteNamesByRaceAndTeam(@Param("raceId") Long raceId, @Param("teamName") String teamName);

    List<RegistrationVO> selectRegistrationVOByRaceId(Long raceId);

    List<RegistrationVO> selectRegistrationVOByCondition(RegistrationVO registrationVO);
}
